package components.animations;

import images.Images;

import com.uqbar.vainilla.DeltaState;
import com.uqbar.vainilla.GameComponent;
import components.scenes.MainGameScene;

public class Explode extends GameComponent<MainGameScene> {

	private double cd = 1;
	
	public Explode(double x, double y){
		super(x, y);
		this.setAppearance(Images.getExplosion());
	}
	
	public void update(DeltaState delta){
		super.update(delta);
		cd -= delta.getDelta();
		
		if (cd < 0){
			this.destroy();
		}
	}
}
